<template>
    <el-row class="content">
        <el-col class="tree">
            <el-tree v-loading="loading" element-loading-spinner="el-icon-loading" :data="data" show-checkbox
                default-expand-all node-key="id" ref="tree" :props="defaultProps">
            </el-tree>
        </el-col>
    </el-row>
</template>

<script>
    import {
        httpAction,
        getAction
    } from '@/http/axios.js';
    import {
        JVxeTableModelMixin
    } from '@/utils/permisson/JVxeTableModelMixin.js'

    export default {
        name: 'PermissionsForm',
        mixins: [JVxeTableModelMixin],
        data() {
            return {
                roles: [],
                roleid: 2,
                data: [],
                defaultProps: {
                    children: 'children',
                    label: 'label'
                },
                checkedkeys: [],
                loading: true,
                url: {
                    list:"/sysuser/getRolePermissionTree",
                    edit: "/sysuser/saveUsrPermissions",
                    treeCheckedList:'/sysuser/getRolePermissionTreeCheckedKeys'
                }
            }
        },
        props: {
            //表单禁用
            disabled: {
                type: Boolean,
                default: false,
                required: false
            }
        },
        computed: {
            formDisabled() {
                return this.disabled
            },
        },
        created() {},
        methods: {
        }
    }
</script>

<style scoped lang="scss">
    .content {
        padding: 10px 20px;
        height: calc(100% - 57px);
        overflow-y: auto;

        /*不显示滚动条*/
        /*.box-card::-webkit-scrollbar {*/
        /*    display: none;*/
        /*}*/
        // 滚动条
        &::-webkit-scrollbar {
            /*滚动条整体样式*/
            width: 5px;
            /*高宽分别对应横竖滚动条的尺寸*/
            height: 1px;
        }

        &::-webkit-scrollbar-thumb {
            /*滚动条里面小方块*/
            // border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #E5E5E5;
        }

        &::-webkit-scrollbar-track {
            /*滚动条里面轨道*/
            // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            // border-radius: 10px;
            background: #f6f6f6;
        }
    }



    .tree {}
</style>
